class UserActionProperty:
    @property
    def init(self):
        """等待用户操作,用户未操作"""
        return 0

    @property
    def saved(self):
        return 1 << 0

    @property
    def passed(self):
        return 1 << 1

    @property
    def rejected(self):
        return 1 << 2

    @property
    def stoped(self):
        return 1 << 3

    @property
    def returned(self):
        return 1 << 4

    @property
    def voided(self):
        return 1 << 5


class ProcessStatusProperty:
    @property
    def init(self):
        """等待用户处理,用户未处理"""
        return 0

    @property
    def processed(self):
        """已处理"""
        return 1

    @property
    def exception(self):
        """处理过程异常"""
        return 1 << 1


class TaskStatusProperty:
    @property
    def init(self):
        """初始化中,待处理的"""
        return 0

    @property
    def saved(self):
        """保存"""
        return 1

    @property
    def processing(self):
        """处理中"""
        return 1 << 1

    @property
    def processed(self):
        """已处理"""
        return 1 << 2

    @property
    def completed(self):
        """任务已结束"""
        return 1 << 3

    @property
    def stoped(self):
        """任务已停止"""
        return 1 << 4

    @property
    def voided(self):
        """任务已作废"""
        return 1 << 5

    @property
    def exception(self):
        """任务异常"""
        return 1 << 6

    @property
    def timeout(self):
        """任务超时"""
        return 1 << 7


UserAction = UserActionProperty()
ProcessStatus = ProcessStatusProperty()
TaskStatus = TaskStatusProperty()
